import React, { Component } from 'react';

class play extends Component {
  constructor() {
    super()
    this.state = {
      sid: ''
    }
  }
  componentWillMount() {
    this.setState({
      sid: this.props.match.params.id
    })
    this.$axios.get('/api/lyric?id='+this.state.sid)
  }
  render() {
    return (
      <div>
        <audio src={'https://music.163.com/song/media/outer/url?id='+this.state.sid+'.mp3'}></audio>
      </div>
    );
  }
}

export default play;
